<%@ page contentType="text/html;charset=UTF-8" language="java"%>


<!DOCTYPE html >

<html>

<head>


    <title>MyPetStore</title>
    <link rel="StyleSheet" href="./css/mypetstore.css" type="text/css" media="screen" />
</head>

<body>

<div id="Header">

    <div id="Logo">
        <div id="LogoContent">
            <a href="mainFrom"> <img src="images/logo-topbar.gif" /></a>
            <p>Welcome to JPetStore!</p>
        </div>
    </div>

    <div id="Menu">
        <div id="MenuContent">
            <a href="cartForm"><img align="middle" name="img_cart" src="images/cart.gif" /></a>

            <img align="middle" src="images/separator.gif" />

            <%
                // 获取 session 中的 account 属性
                Object account = session.getAttribute("account");
            %>

            <%
                if (account == null) {
            %>
            <a href="signonForm">Sign On</a>
            <img align="middle" src="images/separator.gif" />
            <%
            } else {
            %>
            <a href="signOut">Sign Out</a>
            <img align="middle" src="images/separator.gif" />
            <a href="editAccountForm">My Account</a>
            <img align="middle" src="images/separator.gif" />
            <%
                }
            %>
            
            <a href="help.html">?</a>
        </div>
    </div>

    <div id="Search">
        <div id="SearchContent">
            <form action="search" method="post">
                <input type="text" name="keyword" size="14">
                <input type="submit" value="Search" class="search-button">
            </form>
            <div id="showDiv1" style="display:none; position:absolute;z-index:1000;top:146px;background:white; width:188px;font-size: 16px;color:black;border:1px solid #ccc;"></div>
        </div>
    </div>
    </div>

    <div id="QuickLinks">
        <a href="categoryForm?categoryId=FISH">Fish</a>
        <img src="images/separator.gif" />
        <a href="categoryForm?categoryId=DOGS">Dogs</a>
        <img src="images/separator.gif" />
        <a href="categoryForm?categoryId=REPTILES">Reptiles</a>
        <img src="images/separator.gif" />
        <a href="categoryForm?categoryId=CATS">Cats</a>
        <img src="images/separator.gif" />
        <a href="categoryForm?categoryId=BIRDS">Birds</a>
    </div>

</div>

<div id="Content"></div>
<!--body在bottom结尾 -->